package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TableDurationCardOperationsMapper;
import com.ruoyi.system.domain.TableDurationCardOperations;
import com.ruoyi.system.service.ITableDurationCardOperationsService;

/**
 * 桌台时长卡规则操作记录 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-22
 */
@Service
public class TableDurationCardOperationsServiceImpl implements ITableDurationCardOperationsService
{
    @Autowired
    private TableDurationCardOperationsMapper tableDurationCardOperationsMapper;

    /**
     * 通过id查询桌台时长卡规则操作记录
     *
     * @param id 桌台时长卡规则操作记录主键
     * @return 桌台时长卡规则操作记录
     */
    @Override
    public TableDurationCardOperations selectTableDurationCardOperationsById(Long id)
    {
        return tableDurationCardOperationsMapper.selectTableDurationCardOperationsById(id);
    }

    /**
     * 通过条件查询桌台时长卡规则操作记录列表
     *
     * @param operationStore,operationType,tableDurationCardId,operationStartTime,operationEndTime 操作门店，操作类型，桌台时长卡编码，操作开始时间，操作结束时间
     * @return 桌台时长卡规则操作记录
     */
    @Override
    public List<TableDurationCardOperations> selectTableDurationCardOperationsListByConditions(String operationStore, String operationType, String tableDurationCardId, Date operationStartTime, Date operationEndTime)
    {
        return tableDurationCardOperationsMapper.selectTableDurationCardOperationsListByConditions(operationStore,operationType,tableDurationCardId,operationStartTime,operationEndTime);
    }

    /**
     * 新增桌台时长卡规则操作记录
     *
     * @param tableDurationCardOperations 桌台时长卡规则操作记录
     * @return 结果
     */
    @Override
    public int insertTableDurationCardOperations(TableDurationCardOperations tableDurationCardOperations)
    {
        return tableDurationCardOperationsMapper.insertTableDurationCardOperations(tableDurationCardOperations);
    }

    /**
     * 修改桌台时长卡规则操作记录
     *
     * @param tableDurationCardOperations 桌台时长卡规则操作记录
     * @return 结果
     */
    @Override
    public int updateTableDurationCardOperations(TableDurationCardOperations tableDurationCardOperations)
    {
        return tableDurationCardOperationsMapper.updateTableDurationCardOperations(tableDurationCardOperations);
    }

    /**
     * 通过id批量删除桌台时长卡规则操作记录信息
     *
     * @param ids 需要删除的桌台时长卡规则操作记录主键
     * @return 结果
     */
    @Override
    public int deleteTableDurationCardOperationsByIds(Long[] ids)
    {
        return tableDurationCardOperationsMapper.deleteTableDurationCardOperationsByIds(ids);
    }

    /**
     * 通过id删除桌台时长卡规则操作记录信息
     *
     * @param id 桌台时长卡规则操作记录主键
     * @return 结果
     */
    @Override
    public int deleteTableDurationCardOperationsById(Long id)
    {
        return tableDurationCardOperationsMapper.deleteTableDurationCardOperationsById(id);
    }
}
